import request from "@/utils/request";

// 查询
export function listBuilding(query) {
  return request({
    url: "/buildings",
    method: "get",
    params: query,
  });
}

//查询
export function getBuilding(id){
  return request({
    url:'/buildings/'+id,
    method:'get'
  })
}

//删除
export function deleteBuilding(id){
  return request({
    url:'/buildings/'+id,
    method:'delete'
  })
}
// 新增
export function addBuilding(data){
  return request({
    url: '/buildings',
    method: 'post',
    data: data
  })
}

// 更新
export function updateBuilding(data){
  return request({
    url: '/buildings',
    method: 'put',
    data: data
  })
}

